module.exports = (app) => {
    const { router, controller } = app;
    // 角色
    router.get('/v1/role/page', controller.system.sysRole.page)
    router.post('/v1/role/create', controller.system.sysRole.create);
    router.put('/v1/role/edit', controller.system.sysRole.edit)
    router.delete('/v1/role/del', controller.system.sysRole.del)
    router.put('/v1/role/updatePerm', controller.system.sysRole.updatePerm);
    router.get('/v1/role/select', controller.system.sysRole.select);
    // 菜单
    router.get('/v1/menu/tree', controller.system.sysMenu.tree)
    router.post('/v1/menu/create', controller.system.sysMenu.create);
    router.put('/v1/menu/edit', controller.system.sysMenu.edit)
    router.delete('/v1/menu/del', controller.system.sysMenu.del)
    router.get('/v1/menu/getMenuIdByRole', controller.system.sysMenu.getMenuIdByRole)

    // 系统用户
    router.get('/v1/user/page', controller.system.sysUser.page)
    router.post('/v1/user/create', controller.system.sysUser.create);
    router.put('/v1/user/edit', controller.system.sysUser.edit)
    router.delete('/v1/user/del', controller.system.sysUser.del);
    router.get('/v1/user/getRoleIdByUser', controller.system.sysUser.getRoleIdByUser)
    router.put('/v1/user/updateRole', controller.system.sysUser.updateRole);
    router.put('/v1/user/resetPwd', controller.system.sysUser.resetPwd)
};
